<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="/css/admin.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	.longtxt{width:300px;}
</style>
<script src="/js/jquery-1.5.1.min.js" language="javascript" type="text/javascript"></script>
<script type="text/javascript">
	function VerifyPage(){
		if($("#cname").val() == ''){
			alert('栏目名称不能为空!');
			return false;
		}
		if($("#tname").val() == ''){
			$("#tid").val('');
		}
		return true;
	}

	function MyGoBack(){ 
		window.location = "/cms/columns/<?=$sid?>/<?=$pid?>";		
	}
	function chooseTpl(){
		window.open('/cms/choosetpl/column','','width=350,height=350,left=' + (screen.availWidth - 350) / 2 + ',top=' + (screen.availHeight - 350) / 2);
	}
	function settpl(parm){		
		var ary = parm.split('|');
		if(ary.length == 2){
			var tid = ary[0];
			var tname = ary[1];
			$("#tname").val(tname);
			$("#tid").val(tid);
		}
	}
	
</script>
</head>
<body>
<form name="form1" action="/cms/savecol" method="post" onSubmit="return VerifyPage();">
<input type="hidden" name="cid" value="<?php echo $cid; ?>" />
<input type="hidden" name="sid" value="<?php echo $sid; ?>" />
<input type="hidden" name="pid" value="<?php echo $pid; ?>" />
<input type="hidden" name="dopost" value="save" />
<div class="listTitle">编辑栏目</div>
<div>
<table cellpadding="5">
<tr><td>栏目名称</td><td><input type="text" class="longtxt" id="cname" name="cname" value="<?=$cname?>" /></td></tr>
<tr><td>描述</td><td><input type="text" class="longtxt" id="descr" name="descr" value="<?=$descr?>" /></td></tr>
<tr><td>模板</td><td><input type="text" class="longtxt" id="tname" name="tname" value="<?=$tname?>" /><input type="hidden" id="tid" name="tid" value="<?=$tid?>" /><input type="button" value="..." onclick="chooseTpl()" /></td></tr>

<tr><td>状态</td><td><input type="radio" id="display0" name="display" value="0" <?php if($display==0)echo('checked');?>  />显示&nbsp;&nbsp;<input type="radio" id="display1" name="display" value="1" <?php if($display==1)echo('checked');?> />隐藏</td></tr>
<tr><td>标签</td><td><input type="text" class="longtxt" id="tag" name="tag" value="<?=$tag?>" /></td></tr>
<tr><td></td><td><input type="submit"  value=" 保存 " />&nbsp;&nbsp;<input type="button" value="取消" onclick="MyGoBack();" /></td></tr>
</table>
</div>
</form>
</body>
</html>